import request from "@/utils/request";

// 查询列表
export const getRoleListApi = (params) => {
  return request({
    url: "/sys/role",
    method: "get",
    params,
  });
};
// 查询单个
export const getRoleInfoApi = (id) => {
  return request({
    url: "/sys/role/" + id,
    method: "get",
  });
};
// 添加
export const addRoleApi = (data) => {
  return request({
    url: "/sys/role",
    method: "post",
    data,
  });
};
// 修改
export const editRoleApi = (data) => {
  return request({
    url: "/sys/role/" + data.id,
    method: "put",
    data,
  });
};
// 删除
export const delRoleApi = (id) => {
  return request({
    url: "/sys/role/" + id,
    method: "delete",
  });
};

// 根据ID查询企业信息
export const getCompanyInfoApi = (id) => {
  return request({
    url: "/company/" + id,
    method: "get",
  });
};
